package com.zykj.abstractfactory;

import com.zykj.abstractfactory.yuanliao.YuanliaoFactory;

/**
 * @author zhoulj(周利军) [1217102780@qq.com]
 * @Title: HunhePizza
 * @Project: ${MODEL_NAME}
 * @Module ID:   <(模块)类编号，可以引用系统设计中的类编号>
 * @Comments: <对此类的描述，可以引用系统设计中的描述>
 * @JDK version used:      <JDK1.8> 05
 * @since 2018/12/27-16:05
 */
public class HunhePizza extends Pizza {

    YuanliaoFactory yuanliaoFactory;
    public HunhePizza(YuanliaoFactory yuanliaoFactory) {
        this.yuanliaoFactory=yuanliaoFactory;
    }
    /**
     * 前期准备
     */
    @Override
    public void prepare() {
        System.out.println("开始生产 pizza:" + getName());
        this.mianfen = yuanliaoFactory.createMianfen();
        this.jiangyou=yuanliaoFactory.createJiangyou();
        this.cheese = yuanliaoFactory.createCheese();
    }
}
